package com.wu.feign;

import com.wu.pojo.Order;
import com.wu.vo.OrderVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "order")
public interface OrderFeign {

    @PostMapping("/order/save")
    public void save(@RequestBody Order order);

    @GetMapping("/order/findallByUid/{page}/{limit}/{uid}")
    public OrderVo findAllByUid(@PathVariable("page") int page, @PathVariable("limit") int limit, @PathVariable("uid")long uid);

    @GetMapping("/order/findAll/{page}/{limit}")
    public List<Order> findAll(@PathVariable("page") int page, @PathVariable("limit") int limit);

    @GetMapping("/order/updateState/{id}")
    public void updata(@PathVariable("id")long id);


    @GetMapping("/order/count")
    public int count();


}
